Creates a Tool instance from a handler function by validating its structure, annotations, and parameters.
Tool